<?

////////////////////////////////
// mobile_matchrow.php
//
// DESCRIPTION:
// Mobile template snippet to output a single row for the mobile site.
// Outputs a match name with link to match, and teams with links to teams with winner strong'ed
// 
// EXPECTS:
// $match, the Match object for the match.
////////////////////////////////

echo "<li>";
echo $match->linkto();
echo " [";
if ($match->getWinner() == 'red') {
	echo "<strong>" . $tba->stringAlliance($match->getTeams('red')) . "</strong> vs. " . $tba->stringAlliance($match->getTeams('blue'));
} elseif ($match->getWinner() == 'blue') {
	echo $tba->stringAlliance($match->getTeams('red')) . " vs. <strong>" . $tba->stringAlliance($match->getTeams('blue')) . "</strong>";
} elseif ($match->getWinner() == 'tie') {
	echo $tba->stringAlliance($match->getTeams('red')) . " vs. " . $tba->stringAlliance($match->getTeams('blue'));
}
echo "]";
if ($match->getRedScore() > -1 AND $match->getBlueScore() > -1) {
	echo " [";
	if ($match->getWinner() == 'red') {
		echo "<strong>" . $match->getRedScore() . "</strong> - " . $match->getBlueScore();
	} elseif ($match->getWinner() == 'blue') {
		echo $match->getRedScore() . " - <strong>" . $match->getBlueScore() . "</strong>";
	} elseif ($match->getWinner() == 'tie') {
		echo $match->getRedScore() . " - " . $match->getBlueScore();
	}
	echo "]";
}
echo "</li>\r\n";

?>